<template>
  <div class="box">
    <div class="single">
      <img :src="item.imgUrl"
           alt="">
      <!-- 商品详情信息 -->
      <div class="details">
        <p class="name oneLine">{{item.name}}</p>
        <div class="price">
          <div class="priceouter">
            <span class="yen">&yen;</span>
            <span class="singlePrice">{{item.price}}</span>
          </div>
          <!-- 商品数量 -->
          <div>
            <span>x</span>
            <span class="num">{{item.num}}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: '',
  props: {
    item: Object,
  },
}
</script>

<style lang='less' scoped>
img {
  margin: 0 10px;
  width: 27%;
  height: 50%;
  border-radius: 5px;
}
.single {
  display: flex;
  justify-content: space-between;
  margin: 12px 20px;
  padding: 10px 0;
  background-color: #fff;
  border-radius: 10px;
}
.details {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  .name {
    font-size: 20px;
    font-weight: 600;
    margin: 10px 0;
  }
  .yen,
  .singlePrice {
    margin: 10px 0;
    margin-right: 5px;
    color: #ec0d0d;
    font-size: 14px;
    font-weight: 600;
  }
  .singlePrice {
    font-size: 18px;
  }
}
.price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 20px;
}
.num {
  margin-left: 5px;
  font-size: 20px;
}
.priceouter {
  display: flex;
  align-items: center;
}
</style>